package controller;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {


    public static void main(String[] args) {

//        HelloWorld obj = new HelloWorld();
        //        obj.setName("wubuze");

        //1. 创建ioc
        ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");

        HelloWorld obj = (HelloWorld) ctx.getBean("helloWorld");

        obj.hello();


        Car car = (Car) ctx.getBean("car");

        System.out.println(car);

    }



}
